export const flatten = (arr: any[]): any[] =>
  arr.reduce((a, v) => a.concat(Array.isArray(v) ? flatten(v) : v), [])

export const trim = (str: string) => str.replace(/^\s+|\s$/, '')
